Optimal. Leaf size=150 \[ \frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) C\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{8 c^{3/2}}-\frac {\sqrt {\pi } \sin \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{8 c^{3/2}}+\frac {e \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {(d+e x)^2}{4 e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3468, 3462, 3448, 3352, 3351} \[ \frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) \text {FresnelC}\left (\frac {b+2 c x}{\sqrt {\pi } \sqrt {c}}\right )}{8 c^{3/2}}-\frac {\sqrt {\pi } \sin \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{8 c^{3/2}}+\frac {e \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {(d+e x)^2}{4 e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3351
Rule 3352
Rule 3448
Rule 3462
Rule 3468
Rubi steps
\begin {align*} \int (d+e x) \cos ^2\left (a+b x+c x^2\right ) \, dx &=\int \left (\frac {1}{2} (d+e x)+\frac {1}{2} (d+e x) \cos \left (2 a+2 b x+2 c x^2\right )\right ) \, dx\\ &=\frac {(d+e x)^2}{4 e}+\frac {1}{2} \int (d+e x) \cos \left (2 a+2 b x+2 c x^2\right ) \, dx\\ &=\frac {(d+e x)^2}{4 e}+\frac {e \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {(4 c d-2 b e) \int \cos \left (2 a+2 b x+2 c x^2\right ) \, dx}{8 c}\\ &=\frac {(d+e x)^2}{4 e}+\frac {e \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {\left ((2 c d-b e) \cos \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \cos \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{4 c}-\frac {\left ((2 c d-b e) \sin \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \sin \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{4 c}\\ &=\frac {(d+e x)^2}{4 e}+\frac {(2 c d-b e) \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) C\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{8 c^{3/2}}-\frac {(2 c d-b e) \sqrt {\pi } S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{8 c^{3/2}}+\frac {e \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.41, size = 139, normalized size = 0.93 \[ \frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) C\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )-\sqrt {\pi } \sin \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e) S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )+\sqrt {c} (e \sin (2 (a+x (b+c x)))+2 c x (2 d+e x))}{8 c^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.91, size = 149, normalized size = 0.99 \[ \frac {2 \, c^{2} e x^{2} + \pi {\left (2 \, c d - b e\right )} \sqrt {\frac {c}{\pi }} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) \operatorname {C}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right ) - \pi {\left (2 \, c d - b e\right )} \sqrt {\frac {c}{\pi }} \operatorname {S}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right ) \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + 4 \, c^{2} d x + 2 \, c e \cos \left (c x^{2} + b x + a\right ) \sin \left (c x^{2} + b x + a\right )}{8 \, c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [C] time = 0.74, size = 304, normalized size = 2.03 \[ \frac {1}{4} \, x^{2} e + \frac {1}{2} \, d x - \frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {i \, b^{2} - 4 i \, a c}{2 \, c}\right )}}{8 \, \sqrt {c} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}} - \frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {-i \, b^{2} + 4 i \, a c}{2 \, c}\right )}}{8 \, \sqrt {c} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}} + \frac {\frac {\sqrt {\pi } b \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {i \, b^{2} - 4 i \, a c - 2 \, c}{2 \, c}\right )}}{\sqrt {c} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}} - i \, e^{\left (2 i \, c x^{2} + 2 i \, b x + 2 i \, a + 1\right )}}{16 \, c} + \frac {\frac {\sqrt {\pi } b \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {-i \, b^{2} + 4 i \, a c - 2 \, c}{2 \, c}\right )}}{\sqrt {c} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}} + i \, e^{\left (-2 i \, c x^{2} - 2 i \, b x - 2 i \, a + 1\right )}}{16 \, c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 170, normalized size = 1.13 \[ \frac {e \sin \left (2 c \,x^{2}+2 b x +2 a \right )}{8 c}-\frac {e b \sqrt {\pi }\, \left (\cos \left (\frac {-4 c a +b^{2}}{2 c}\right ) \FresnelC \left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 c a +b^{2}}{2 c}\right ) \mathrm {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{8 c^{\frac {3}{2}}}+\frac {\sqrt {\pi }\, d \left (\cos \left (\frac {-4 c a +b^{2}}{2 c}\right ) \FresnelC \left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 c a +b^{2}}{2 c}\right ) \mathrm {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{4 \sqrt {c}}+\frac {d x}{2}+\frac {e \,x^{2}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 1.69, size = 735, normalized size = 4.90 \[ -\frac {{\left (4^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + \left (i + 1\right ) \, \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 i \, c x + i \, b}{\sqrt {2 i \, c}}\right ) + {\left (\left (i + 1\right ) \, \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + \left (i - 1\right ) \, \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 i \, c x + i \, b}{\sqrt {-2 i \, c}}\right )\right )} c^{\frac {3}{2}} - 16 \, c^{2} x\right )} d}{32 \, c^{2}} + \frac {\sqrt {2} {\left ({\left (\left (i - 1\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )} - \left (i + 1\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )}\right )} b^{2} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + {\left (\left (i + 1\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )} - \left (i - 1\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )}\right )} b^{2} \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + {\left ({\left (\left (2 i - 2\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )} - \left (2 i + 2\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )}\right )} b c \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + {\left (\left (2 i + 2\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )} - \left (2 i - 2\right ) \, \sqrt {2} \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{c}}\right ) - 1\right )}\right )} b c \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} x + \sqrt {2} {\left (8 \, c^{2} x^{2} + c {\left (-2 i \, e^{\left (\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{2 \, c}\right )} + 2 i \, e^{\left (-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{2 \, c}\right )}\right )} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + 2 \, c {\left (e^{\left (\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{2 \, c}\right )} + e^{\left (-\frac {4 i \, c^{2} x^{2} + 4 i \, b c x + i \, b^{2}}{2 \, c}\right )}\right )} \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \sqrt {\frac {4 \, c^{2} x^{2} + 4 \, b c x + b^{2}}{c}}\right )} e}{64 \, c^{2} \sqrt {\frac {4 \, c^{2} x^{2} + 4 \, b c x + b^{2}}{c}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\cos \left (c\,x^2+b\,x+a\right )}^2\,\left (d+e\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (d + e x\right ) \cos ^{2}{\left (a + b x + c x^{2} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________